<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!-- 需要引入 jstl标签， 但是由于大家都包含header.jsp，所以只要在header.jsp引入，其它界面就可以不再引入 -->
 <%-- http://localhost:8080/bookStore_v3/servlet/ControllerServlet?op=listCategories --%>
	<%@include file="header.jsp"%>
    
    <table border="1">
    	<tr>
    		<th nowrap="nowrap">选择</th>
				<th nowrap="nowrap">书名</th>
				<th nowrap="nowrap">作者</th>
				<th nowrap="nowrap">单价</th>
				<th nowrap="nowrap">所属分类</th>
				<th nowrap="nowrap">图片</th>
				<th nowrap="nowrap">操作</th>
    	</tr>
    	
    	<c:forEach items="${page.records}" var="b" varStatus="vs">
				<%-- <tr class="${vs.count%2==0?'odd':'even'}"> --%>
	    	<tr bgcolor="${vs.index%2==0?'#C9C9C9':'#6192B0'}">
					<td nowrap="nowrap">
						<input type="checkbox" name="bookId" value="${b.id}"/>
					</td>
					<td nowrap="nowrap">${b.name}</td>
					<td nowrap="nowrap">${b.author}</td>
					<td nowrap="nowrap">${b.money}</td>
					<td nowrap="nowrap">${b.categoryId}</td>
					
					<td nowrap="nowrap">
						<img src="${pageContext.request.contextPath}/images/${b.path}/${b.newImageName}"/>
					</td>
					<td nowrap="nowrap">
						<!-- 略 -->
						[<a href="#">修改</a>]
						[<a href="#">删除</a>]
					</td>
				</tr>
			</c:forEach>
    
    
    </table>
    
    <%-- 引入分页页面 --%>
    <%@include file="/commons/page.jsp" %>
    
  </body>
</html>
